Database Properties

Honeystore consists of databases. A database is a collection of historical values for items. A database has a set of properties. New databases can be created when Honeystore is running. Database can also be deleted when Honeystore is running.

Database Properties

The Honeystore database has the following properties:

NameDescriptionChangeability
FileVersionThe file version of the meta-storageRead-only
NameName of the databaseRead-write
CachePathThe path of the location where the cache-file will be placedRead-write
DataDirPathThe path of the location on disk where all the historical files are storedRead-write
ConfigFileThe full path and name to the configuration file of the databaseRead-write
RunningModeThe running mode of the database, see Running Modes for description of the various modes.Read-write
EventSuppressionA property deciding which events that will be suppressed from the event-log reporting mechanism.Read-write
MaxItemsThe currently maximum item-count of the databaseRead-write
UsedItemsThe currently used item-count in the databaseRead-only
CacheSizeThe size (in bytes) of the internal caches of the database, See also this.Read-write
MaxTrendFileSizeThe maximum size (in bytes) an active trend-file may have. No retroactive effect if changed.Read-write
MaxDataBlockSizeThe maximum size (in bytes) a single contiguous data-block may have. Used when importing and logging data. No retroactive effect if changed.Read-write
CreationDateThe date when the database was createdRead-only
ModifiedDateThe date any of the properties of the database were modifiedRead-only
DBHandleThe current handle of the databaseRead-only
CompressionStateThe compression state of the databaseRead-write
TimestampPrecisionThe precision of the time-stamps, applies only for Eventbased with quality data samplesRead-write
CapabilitiesThe capabilities of a Honeystore database; to allow or deny inserts of out-of-sequence (OOS) data in Online mode.
Note! When allowing inserts of out-of-sequence data in Online mode, the inserts are handled asynchronously. That means that if you read back history immediately after an Insert call, you are not guaranteed to read back the OOS data you just inserted. OOS data inserts are put into a queue, and will be Inserted into history without interfering with the real-time capabilities of the database.
Read-write
AvgCacheFlushTimeThe average time in milliseconds used when flushing a cache into its corresponding trend file.
Only applies when RunningMode is Online no write-cache.
Read-only
MaxCacheFlushTime

The maximum time in milliseconds used when flushing a cache into its corresponding trend file.

Only applies when RunningMode is Online no write-cache.

Read-only
NumLostCaches

The number of lost caches due to performance issues. If this value is other than 0, it indicates data loss caused by performance issues.

Only applies when RunningMode is Online no write-cache.

Read-only
NumCacheFlushes

The number of caching flush iterations. Ie. the number of individua item caches that have been flushed since database was loaded.

Only applies when RunningMode is Online no write-cache.

 

Most of the properties can be changed directly, marked as read-write. The properties marked as read-only are changed indirectly (like the number of used items, which varies when items are added or removed from the database), or simply display some information and are not applicable for changing (like cache flush time properties).

Compression State

The data of a HoneyStore database, typically is compressed. Several compression types are offered.

The various compression states of a database, are:

NameDescription
UncompressedNo compression, raw data stored as is.
Legacy_FastLossless, old maximum compression. Fast.
Legacy_MaxLossless, old maximum compression. Very slow, but offers the highest compression ratio.
LZ4_2Lossless LZ4 compression, acceleration level 2 (default). Best compromise of speed /compression ratio.
LZ4_8Lossless LZ4 compression, acceleration level 8. Slightly better speed, lower compression ratio, than LZ4_2.
LZ4_56Lossless LZ4 compression, acceleration level 56. Even better speed, and lower compression ratio, than LZ4_8.

LZ4 compression disclaimer

LZ4 Library
Copyright (c) 2011-2016, Yann Collet
All rights reserved.
www.lz4.org

Database meta data storage

HoneyStore may store its meta data in several ways:

Windows registry and storage file.

In the windows registry, there will be a key for each database, to tell where the actual configuration file of the database is located. Using MYDB as an example, this registry would be:

HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\ApisHoneyStore\Databases

Underneath this registry key, there will be one string value named ConfigFile, whose value will be the full path and filename of the configuration file of that database.
For our example dayabase, when using the ApisNativeStorage file format):

ConfigFile = ApisDIR\Config\ApisHoneystore\MYDB.ansb

or (if using older ApisStructuredStorage file format):

ConfigFile = ApisDIR\Config\ApisHoneystore\MYDB.acdb

where ApisDIR typically is: C:\\program files\apis\config

Historical data files

The historical data files of the database are located at:

DATADIR\MYDB.dat*

where DATADIR is the DataDirPath property of the database.